import request from '@/utils/request'
 
// 查询专业信息列表
export function listMajors(query) {
  return request({
    url: '/edu/hMajors/list',
    method: 'get',
    params: query
  })
}

export function getHMajorsByCollegeId(collegeId) {
  return request({
    url: '/edu/hMajors/list/' + collegeId,
    method: 'get'
  })
}

// 查询专业信息详细
export function getMajors(majorId) {
  return request({
    url: '/edu/hMajors/' + majorId,
    method: 'get'
  })
}

// 新增专业信息
export function addMajors(data) {
  return request({
    url: '/edu/hMajors',
    method: 'post',
    data: data
  })
}

// 修改专业信息
export function updateMajors(data) {
  return request({
    url: '/edu/hMajors',
    method: 'put',
    data: data
  })
}

// 删除专业信息
export function delMajors(majorId) {
  return request({
    url: '/edu/hMajors/' + majorId,
    method: 'delete'
  })
}

// 导出专业信息
export function exportMajors(query) {
  return request({
    url: '/edu/hMajors/export',
    method: 'get',
    params: query
  })
}